# -*- mode: snippet -*-
# name: decorator
# key: dec
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil))
# --
def ${1:decorator}(func):
    $2
    def _$1(*args, **kwargs):
        $3
        ret = func(*args, **kwargs)
        $4
        return ret

    return _$1